﻿<Page x:Class="TreeBuilder.Help.FramesPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:Help="clr-namespace:TreeBuilder.Help"
      xmlns:TreeBuilder="clr-namespace:TreeBuilder"
      xmlns:Controls="clr-namespace:Elderos.Controls;assembly=Elderos.Controls" mc:Ignorable="d"
      d:DesignHeight="800" d:DesignWidth="600"
      Title="Frames">
    <Page.Resources>
        <ResourceDictionary Source="pack://application:,,,/Help/HelpStyles.xaml" />
    </Page.Resources>
    <Grid>
        <Controls:HelpMasterPage AllowDrop="False">
            <Controls:HelpMasterPage.Title>Frames</Controls:HelpMasterPage.Title>
            <Controls:HelpMasterPage.Content>
                <StackPanel MinHeight="400">
                    <RichTextBox Name="RichTextBox" BorderThickness="0" IsReadOnly="True">
                        <FlowDocument>
                            <Paragraph Margin="0,0,0,5">
                                Sometimes it's necessary to unite some nodes into a logical group.
                                TreeBuilder has an instrument called
                                <Run FontWeight="Bold">Frame</Run>, which can help you doing this.
                            </Paragraph>
                            <Paragraph Margin="0,0,0,5" FontSize="10">
                                (The Tree Canvas below is fully operable. You can try to perform any action there.)
                            </Paragraph>
                        </FlowDocument>
                    </RichTextBox>
                    <TreeBuilder:Tree Height="200" />
                    <RichTextBox Name="BottomBox" BorderThickness="0" IsReadOnly="True">
                        <FlowDocument>
                            <Paragraph Margin="0,5,0,0">
                                To create a frame, click and hold right mouse button, then drag it to desired size and release button.
                            </Paragraph>
                            <Paragraph Margin="0,5,0,0" Style="{StaticResource ResourceKey=HeaderStyle}">
                                Frame is a node
                            </Paragraph>
                            <Paragraph Margin="0,5,0,0">
                                Yes, that is. That means you can bind it to another node or frame with line, arrow or triangle. You can bind node to frame, too.
                                When a frame gets focused, its menu appears. It contains 5 buttons (they behave the same way as if it were a node).
                            </Paragraph>
                            <Paragraph Margin="0,5,0,0" Style="{StaticResource ResourceKey=HeaderStyle}">
                                Frame is a binder
                            </Paragraph>
                            <Paragraph Margin="0,5,0,0">
                                It isn't true, indeed. But frames have context menu as well as node menu. Click the right mouse button on a frame, and context menu appears.
                                It contains the same items as a line does (color, thickness, dash style).
                            </Paragraph>
                        </FlowDocument>
                    </RichTextBox>
                </StackPanel>
            </Controls:HelpMasterPage.Content>
        </Controls:HelpMasterPage>
    </Grid>
</Page>
